package project2;

import java.io.Serializable;

public class GPeerMessage implements Serializable{
	private static final long serialVersionUID = 865343073909773440L;

	public enum Type {
		FIND_SUCCESSOR, SUCCESSOR, FIND_PREDECESSOR, PREDECESSOR, NOTIFY, PAYLOAD
	}

	public Type type;
	public GPeerInformation sender;
	public long idToFindSuccessorOf;	// FIND_SUCCESSOR
	public int successorDestination;	// FIND_SUCCESSOR, SUCCESSOR
	public GPeerInformation peer;		// SUCCESSOR, PREDECESSOR
	public long idOfPayloadDestination;	// PAYLOAD
	public String payload;				// PAYLOAD
	public PhysicsObject obj;			//PAYLOAD
	public float ObjScale;				//PAYLOAD
	public float ObjMass;				//PAYLOAD
	public float[] color = new float[3];//PAYLOAD

	public GPeerMessage(Type type, GPeerInformation sender) {
		this.type = type;
		this.sender = sender;
	}
}
